<g-data-source url="/grule-manager/sqlConfig/sqlConfig_page" data-source-name="SqlConfigSource" page="true" ></g-data-source>
<div class="engine-test">
    <!--测试管理左-->
    <div class="engine-test-l">
        <div class="engine-test-manage">
            <div class="engine-test-manage-l">数据源管理</div>
            <div class="engine-test-manage-r model-r"><input type="text"  style="width: 90px" ng-model="searchKey" ><i class="icon-engine-search"></i><a href="javascript:void(0)" ng-click="addDataSource()"><i class="icon-engine-plus"></i></a></div>
            <div class="clear"></div>
        </div>
        <table width="100%">
            <tr  ng-repeat="dataSource in dataSources|filter:{'datasourceName': searchKey}">
                <td>
                    <div class="engine-test-case" id="{{dataSource.id}}" name="dataSourceList">
                        <div class="engine-test-case-l"><a href="javascript:void(0)" ng-click="viewDataSource(dataSource)">{{dataSource.datasourceName}}</a></div>
                        <div class="engine-test-case-r"><a href="javascript:void(0)" ng-click="deleteDataSource(dataSource.id)"><img src="../../static/images/close.png"></a></div>
                        <div class="clear"></div>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <div class="engine-test-r">
        <div class="engine-test-r-tit">{{datasourceName}}</div>
        <div class="engine-test-r-con">

            <div class="management">
                <div class="management-l">数据源配置</div>
                <div class="management-r" style="padding-right: 3%"><button type="button" class="engine-btn-default" ng-click="saveJdbc()">保存</button></div>
                <div class="clear"></div>
            </div>
                <div class="form-group" style="width:30%;float: left;" >
                    <div class="attribute-form-group-l">链接地址：</div>
                    <div class="attribute-form-group-r">
                        <input type="text" name="varName" ng-model="dataSource.url">
                    </div>
                </div>
                <div class="form-group" style="width:30%;float: left;">
                    <div class="attribute-form-group-l">用户名：</div>
                    <div class="attribute-form-group-r">
                        <input type="text" name="varName" ng-model="dataSource.username">
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="form-group" style="width:30%;float: left;">
                    <div class="attribute-form-group-l">密码：</div>
                    <div class="attribute-form-group-r">
                        <input type="password" name="varName" ng-model="dataSource.password">
                    </div>
                    <div class="clear"></div>
                </div>
            <div class="management">
                <div class="management-l">查询语句管理</div>
                <div class="management-r"><button type="button" class="engine-btn-default" ng-click="addSqlConfig()"><i class="icon-engine-plus"></i>增加</button></div>
                <div class="clear"></div>
                <div class="col-md-10" style="width: 100% ;padding-top: 5px">
                    <g-data-grid style="height: auto;" data-source-name="SqlConfigSource"
                                 ng-cloak>
                        <g-column  data="sqlName" width="90px">
                            名称
                        </g-column>
                        <g-column  data="sqlExpress" width="250px">
                            查询语句
                        </g-column>
                        <g-column  data="sqlParam" width="180px">
                            入参配置
                        </g-column>
                        <g-column  data="sqlResult" width="180px">
                            结果获取
                        </g-column>
                        <g-column  align-center  width="120px">
                            操作
                            <g-column-tmpl >
                                <a href="javascript:" ng-click="removeSqlConfig(row)"><span class="glyphicon glyphicon-remove"
                                                                                       aria-hidden="true"></span>&nbsp;&nbsp;</a>
                                <a href="javascript:" ng-click="editSqlConfig(row)"><span
                                        class="glyphicon glyphicon-edit" aria-hidden="true"></span>&nbsp;&nbsp;修改</a>
                            </g-column-tmpl>
                        </g-column>
                    </g-data-grid>
                    <g-pagination-navi source-name="SqlConfigSource"></g-pagination-navi>
                    <g-pagination-size source-name="SqlConfigSource"></g-pagination-size>
                </div>
            </div>
        </div>

    </div>

    <div class="clear"></div>
</div>